#ifndef PROJECT5_H
#define PROJECT5_H
#include <list>
#include <assert.h>
typedef unsigned int uint;
struct Vertex
{
    uint ID;
    char Code[3];
};

struct Edge
{
    Vertex v1;
    Vertex v2;
};

typedef std::list<Vertex> VertexSet;
typedef std::list<Edge> EdgeSet;
typedef std::list<uint> UIntSet;
struct Graph
{
    uint NumVertices()
    {
        return static_cast<uint>(Vertices.size());
    }
    uint NumEdges()
    {
        return static_cast<uint>(Edges.size());
    }
    void Print();
    VertexSet Vertices;
    EdgeSet Edges;
    bool ContainsEdge(uint v1, uint v2);
};

Graph loadGraph( );
inline uint bit(uint i) {
    return static_cast<uint>(1) << i;
}

//
// The algorithm for Vertex Cover
// @input g: the graph which to compute the vertex cover
//
UIntSet VertexCover(Graph& g);

//
// Algorithm to create a sub-graph from a larger graph
// @input g: the graph
// @input numVertices: the number of vertices's of the sub graph
//
Graph CreateSubGraph(Graph& g, uint numVertices);

// 
// Automate running a test, with output
//
void RunVertexCoverTest(Graph g, uint n);

VertexSet approxVertexCover( Graph graph );

void display( Graph& subGraph, VertexSet& exhaustiveSearchVertices, long exhaustiveSearchTime, VertexSet& approxVertices, long approxRunTime );

VertexSet convertGraph( Graph graph, UIntSet index );

#endif // PROJECT5_H
